{
    "fields": {
       "project":
       {
          "key": "key_project"
       },
       "summary": "{{ticket_title}}",
       "description": "{{ticket_description}}",
{% if environment_name == 'prod8' %}
       "issuetype": {
                        "self": "https://jira-url.ru/rest/api/2/issuetype/11300",
                        "id": "11300",
                        "description": "",
                        "iconUrl": "https://jira-url.ru/secure/viewavatar?size=xsmall&avatarId=11504&avatarType=issuetype",
                        "name": "Инцидент",
                        "subtask": false,
                        "avatarId": 11504
                      },
{% else %}
       "issuetype": {
                        "self": "https://jira-url.ru/rest/api/2/issuetype/11600",
                        "id": "11600",
                        "description": "",
                        "iconUrl": "https://jira-url.ru/secure/viewavatar?size=xsmall&avatarId=11503&avatarType=issuetype",
                        "name": "Дефект",
                        "subtask": false,
                        "avatarId": 11503
                      },
{% endif %}
                "assignee": {
                   "name": "{{lookup('env','bamboo_ManualBuildTriggerReason_userName') or jira_username}}",
                },
        "labels": [
            "bamboo_autogenerated"
        ],
         "customfield_13903": {
                    "self": "https://jira-url.ru/rest/api/2/user?username=user",
                    "name": "user",
                    "key": "user",
                    "emailAddress": "@mail",
                    "avatarUrls": {
                        "48x48": "https://jira-url.ru/secure/useravatar?ownerId=user&avatarId=14202",
                        "24x24": "https://jira-url.ru/secure/useravatar?size=small&ownerId=user&avatarId=14202",
                        "16x16": "https://jira-url.ru/secure/useravatar?size=xsmall&ownerId=user&avatarId=14202",
                        "32x32": "https://jira-url.ru/secure/useravatar?size=medium&ownerId=user&avatarId=14202"
                    }
                },
        "duedate": "{{ ticket_due_date }}"

    }

}
